// index.mjs
import express from 'express';
import { fileURLToPath } from 'url';
import path from 'path';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const app = express();
const PORT = 4001;

// 设置静态文件目录
app.use(express.static(path.join(__dirname, 'src/assets')));

app.get('/', (req, res) => {
  res.send('Hello from Express Server!');
});

app.listen(PORT, () => {
  console.log(`Server is running on http://localhost:${PORT}`);
});
